package com.gym.dao;

import com.gym.pojo.Goods;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface GoodsDao {
    //商品列表
    public List<Goods> selectcp(String goodsname);
    //添加商品
    public int insertjh(Goods goods);
    //采购增加库存或者进货减少库存
    public int updatejhj(int totalstock,int goodsId);
    //删除商品
    public int deletesc(int goodsId);
    //
    public int updatezj(int goodsId,int goodsamount);
    //判断商品已存在
    public int selectysp(String goodsname);
    //判断总库存是否大于或等于货架数,大于进货
    public int selectzkc(int goodsId,int totalstock);
    //判断货架数是否大于等于购买数量
    public int selectsl(int goodsId,int goodsamount);
    //商品进货增加货架量
    public int updatejj(int totalstock,int goodsId,int goodsamount);
}
